package com.forum.dao;

import java.util.List;

import com.forum.pojo.Post;

public interface PostDAO {
	/**
	 * 
	  * addPost 方法 
	  * 方法说明:发帖 
	  * @param post
	  * @return 
	  * @return int 
	  * @author Evan 
	  * @date 2012-12-22
	 */
	public int addPost(Post post) throws Exception;
	/**
	 * 
	  * viewAllPost 方法 
	  * 方法说明:根据用户ID查询其发的所有帖子
	  * @param userId
	  * @return
	  * @throws Exception 
	  * @return ArrayList<Post> 
	  * @author Evan 
	  * @date 2012-12-25
	 */
	public List<Post> viewAllPost(int userId) throws Exception;
	/**
	 * 
	  * viewPostById 方法 
	  * <p>方法说明:根据postid查询Post 
	  * @param postid
	  * @return
	  * @throws Exception 
	  * @return Post 
	  * @author Evan 
	  * @date 2012-12-26
	 */
	public Post viewPostById(int postid) throws Exception;
}
